package cn.niit.letuseatdemo.service.impl;

import java.util.List;

import cn.niit.letuseatdemo.entity.domain.ShopCategory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.niit.letuseatdemo.mapper.ShopCategoryMapper;

import cn.niit.letuseatdemo.service.ShopCategoryService;


/**
 * 店铺类别Service业务层处理
 * 
 * @author aoli_jojo
 * @date 2022-10-26
 */
@Service
public class ShopCategoryServiceImpl implements ShopCategoryService
{
    @Autowired
    private ShopCategoryMapper shopCategoryMapper;

    /**
     * 查询店铺类别
     * 
     * @param categoryId 店铺类别主键
     * @return 店铺类别
     */
    @Override
    public ShopCategory selectShopCategoryByCategoryId(Long categoryId)
    {
        return shopCategoryMapper.selectShopCategoryByCategoryId(categoryId);
    }

    /**
     * 查询店铺类别列表
     * 
     * @param shopCategory 店铺类别
     * @return 店铺类别
     */
    @Override
    public List<ShopCategory> selectShopCategoryList(ShopCategory shopCategory)
    {
        return shopCategoryMapper.selectShopCategoryList(shopCategory);
    }

    /**
     * 新增店铺类别
     * 
     * @param shopCategory 店铺类别
     * @return 结果
     */
    @Override
    public int insertShopCategory(ShopCategory shopCategory)
    {
        return shopCategoryMapper.insertShopCategory(shopCategory);
    }

    /**
     * 修改店铺类别
     * 
     * @param shopCategory 店铺类别
     * @return 结果
     */
    @Override
    public int updateShopCategory(ShopCategory shopCategory)
    {
        return shopCategoryMapper.updateShopCategory(shopCategory);
    }



    /**
     * 删除店铺类别信息
     * 
     * @param categoryId 店铺类别主键
     * @return 结果
     */
    @Override
    public int deleteShopCategoryByCategoryId(Long categoryId)
    {
        return shopCategoryMapper.deleteShopCategoryByCategoryId(categoryId);
    }


}
